﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Common/Master/FrameMain.Master" AutoEventWireup="true" CodeBehind="List.aspx.cs" Inherits="Jzy.Web.Account.List" %>
<%@ Register src="../Common/Controls/Selecter.ascx" tagname="Selecter" tagprefix="uc1" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">

 <style type="text/css">
    .style1
    {
        letter-spacing:1px;
    }
 </style>

 <script type="text/javascript">
     $(function ()
     {
        
         $('#<%=btnExport.ClientID %>').bind("click", function ()
         {
             window.setTimeout(function ()
             {
                 $(":submit").attr("disabled", "");
             }, 20);
         });
     });         
 </script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
<div id="toolbar">
        <ul>
            <li><a id="lnkIncome" runat="server" href="javascript:go()"><span>
                <b style="background-image: url(../../common/images/icons/addnew.gif);">&nbsp;</b><asp:Literal
                    ID="Literal4" runat="server" Text="收入"></asp:Literal></span></a></li>
            <li><a id="lnkOut" runat="server" href="javascript:go()"><span>
                <b style="background-image: url(../../common/images/icons/addnew.gif);">&nbsp;</b><asp:Literal
                    ID="Literal1" runat="server" Text="支出"></asp:Literal></span></a></li>
             <li><a id="lnkDelete" runat="server" href="javascript:go()"><span>
                <b style="background-image: url(../../common/images/icons/DELETE.gif);">&nbsp;</b><asp:Literal
                    ID="Literal2" runat="server" Text="删除"></asp:Literal></span></a></li>
             <li style="width:90px;"><a id="lnkExport" runat="server" href="javascript:go()"><span>
                <b style="background-image: url(../common/images/common/export.gif);">
                &nbsp;</b><asp:Literal ID="Literal3" runat="server" Text="导出"></asp:Literal></span></a></li>
        </ul>
    </div>
    <div id="head">
        <div class="left">
            <span style="font-weight: bold">收支一览</span>
        </div>
        <div class="right">
            <asp:DropDownList ID="drpIsIncome" runat="server" AutoPostBack="True" 
                onselectedindexchanged="drpIsIncome_SelectedIndexChanged">
            </asp:DropDownList>
            <asp:DropDownList ID="drpType" runat="server" AutoPostBack="True" 
                onselectedindexchanged="drpType_SelectedIndexChanged">
            </asp:DropDownList>
         关键字：<asp:TextBox ID="txtName" runat="server" Width="100px" CssClass="txt"></asp:TextBox>
            日期：<asp:TextBox ID="txtStartTime" runat="server" Width="80px" CssClass="txt"></asp:TextBox>—<asp:TextBox
                ID="txtEndTime" CssClass="txt" runat="server" Width="80px"></asp:TextBox>
            <asp:Button ID="btnQuery" runat="server" Text="查询" OnClick="btnQuery_Click" />
              <asp:DropDownList ID="drpPager" runat="server" OnSelectedIndexChanged="drpPager_SelectedIndexChanged">
            </asp:DropDownList>
        </div>
    </div>
    <div id="list">
        <asp:HiddenField ID="hidSelectIDs" runat="server" Value="" />
        <table id="lvList" cellpadding="0" cellspacing="0" border="0" width="100%">
            <tr id="lvHeader" runat="server">
                <th class="sp">
                    &nbsp;
                </th>
                <th class="chk">
                    <asp:CheckBox ID="chkSelectAll" runat="server" />
                </th>
                <th>
                    描述
                </th>
                <th>金额</th>
                <th>发生时间</th>
                
                <th>类型</th>
                <th>
                    录入员
                </th>
                <th>
                    操作
                </th>
            </tr>
            <asp:ListView ID="lv" runat="server" ItemPlaceholderID="items" 
                onitemdatabound="lv_ItemDataBound">
                <LayoutTemplate>
                    <tr id="items" runat="server">
                    </tr>
                </LayoutTemplate>
                <ItemTemplate>
                    <tr id="row" runat="server">
                        <td class="sp">
                            &nbsp;
                        </td>
                        <td class="chk">
                            <asp:CheckBox ID="chkSelect" runat="server" />
                        </td>
                        <td>
                            <%#Eval("Name") %>&nbsp;
                        </td>
                        <td class="style1">
                            <%#Eval("Amount","{0:c}") %>(<%#((bool)Eval("IsIncome"))?"收":"支"%>)&nbsp;
                        </td>
                        <td>
                            <%#Eval("OccurTime","{0:d}") %>
                        </td>                       
                        <td>
                            <%#Eval("TypeName") %>
                        </td>
                        <td>
                            <%#Eval("CreatorName") %>(<%#Eval("InputTime","{0:d}") %>)&nbsp;
                        </td>
                        <td>
                            <asp:HyperLink ID="lnkEdit" runat="server">修改</asp:HyperLink>
                        </td>
                    </tr>
                </ItemTemplate>
                <EmptyDataTemplate>
                    <tr>
                        <td colspan="8" class="empty">
                            没有数据
                        </td>
                    </tr>
                </EmptyDataTemplate>
            </asp:ListView>
            
            
        </table>
    </div>
     <div class="foot">
        <div class = "foot_left">
        <span style="margin-left:56px;">支出：</span><asp:Label ID="litOut" Font-Bold="true" runat="server" Text="Label" style="letter-spacing:1px; margin-right:10px; color:Red;"></asp:Label>
        收入：<asp:Label ID="litIncome" Font-Bold="true" runat="server" Text="Label" style="letter-spacing:1px; margin-right:10px;"></asp:Label>
        合计：<asp:Label ID="litTotal" Font-Bold="true" runat="server" Text="Label" style="letter-spacing:1px;"></asp:Label>
        </div>
    </div>
    <div id="foot">
     <uc1:Selecter ID="Selecter1" runat="server" />
        <asp:Literal ID="litPager" runat="server"></asp:Literal>        
        </div>
    <div style="clear: both;" />
   
    <div id="toolbar_bottom">
         <asp:Button ID="btnRefresh" runat="server" Text="Button" OnClick="btnRefresh_Click"
            CssClass="refresh" />
         <asp:Button ID="btnDelete" runat="server" Text="删除" OnClick="btnDelete_Click" CausesValidation="False"  />
        <asp:Button ID="btnExport" runat="server" Text="导出" onclick="btnExport_Click" />
    </div>
</asp:Content>
